import request from '@/utils/request'

// 创建危险作业票主
export function createLicence(data) {
  return request({
    url: '/biz/licence/create',
    method: 'post',
    data: data
  })
}

// 更新危险作业票主
export function updateLicence(data) {
  return request({
    url: '/biz/licence/update',
    method: 'put',
    data: data
  })
}

// 删除危险作业票主
export function deleteLicence(id) {
  return request({
    url: '/biz/licence/delete?id=' + id,
    method: 'delete'
  })
}

// 获得危险作业票主
export function getLicence(id) {
  return request({
    url: '/biz/licence/get?id=' + id,
    method: 'get'
  })
}

// 获得危险作业票主分页
export function getLicencePage(query) {
  return request({
    url: '/biz/licence/page',
    method: 'get',
    params: query
  })
}

// 导出危险作业票主 Excel
export function exportLicenceExcel(query) {
  return request({
    url: '/biz/licence/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
